package com.dailyblue.java.spring.aop.xml.advice;

import org.springframework.aop.AfterReturningAdvice;
import org.springframework.stereotype.Component;

import java.lang.reflect.Method;

// 通知 会在 UserDAO方法执行之后自动执行
@Component
public class TransactionsAfterAdvice implements AfterReturningAdvice {

    @Override
    public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable {
        System.out.println("提交了事务");
    }
}
